package com.aiden.cashbook.charge.dagger

import com.aiden.cashbook.charge.ChargePresenter
import com.aiden.cashbook.data.charge.ChargeLocalDataSource
import com.aiden.cashbook.data.charge.ChargeRemoteDataSource
import com.aiden.cashbook.data.charge.ChargeRepository
import dagger.Module
import dagger.Provides
import javax.inject.Named

@Module
class ChargePresenterModule {

    @Named("repository")
    @Provides
    fun provideRepository(): ChargeRepository {
        return ChargeRepository(ChargeLocalDataSource(), ChargeRemoteDataSource())
    }

    @Provides
    fun provideChargePresenter(@Named("repository") chargeRepository: ChargeRepository): ChargePresenter {
        return ChargePresenter(chargeRepository)
    }

}